package com.lsc.record.core.service;

import com.lsc.record.core.entity.DmContent;

public interface ContentServcie {
	
	/**
	 * 创建文件内容
	 * @param content
	 * @return
	 */
	public DmContent create(DmContent content,String userName) throws Exception;
	
	/**
	 * 获取当前版本内容
	 * @param docId
	 * @return
	 */
	public DmContent getCurrentContent(String docId) throws Exception;
	
	/**
	 * 更新版本内容
	 * @param content
	 * @param docId
	 * @param isPrimayVersion
	 * 默认小版本自动加1，若isPrimaryVersion为true则主版本加1小版本为0
	 * @return
	 */
	public DmContent updateVersion(DmContent content,String docId,boolean isPrimayVersion,String userName) throws Exception;
	
	/**
	 * 删除所有文档版本的内容
	 * @param docId
	 * @return
	 */
	public Boolean deleteAllContent(String docId,String userName) throws Exception;
	
	/**
	 * 删除指定版本的内容
	 * @param docId
	 * @param primaryVersion
	 * @param subVersion
	 * @return
	 */
	public Boolean deleteVersion(String docId,Integer primaryVersion,Integer subVersion,String userName) throws Exception;
}
